﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

/// <summary>
/// Summary description for IPosts
/// </summary>
public interface IPosts
{
    /// <summary>
    /// Get list object Posts of user
    /// </summary>
    /// <param name="user">Object Users</param>
    /// <returns>Return list object Posts</returns>
    List<Posts> GetListPostsOfUser(Users user);

    /// <summary>
    /// Get list object Post of user by date
    /// </summary>
    /// <param name="user">Ojbect Users posts article</param>
    /// <param name="date">Created date to present</param>
    /// <returns>Retur list object Posts</returns>
    List<Posts> GetListPostOfUserByDate(Users user, DateTime date);

    /// <summary>
    /// Get list object Posts of user by privacy
    /// </summary>
    /// <param name="user">Object Users posts article</param>
    /// <param name="privacy">Privacy of article</param>
    /// <returns>Return list object Posts</returns>
    List<Posts> GetPostByPrivacy(Users user, bool privacy);

    Posts GetPostByIdPost(int idPost);

    /// <summary>
    /// User post article
    /// </summary>
    /// <param name="user">Object Posts want to post article</param>
    /// <param name="contents">Contents of article</param>
    /// <param name="privacy">Privacy of article</param>
    /// <returns>Return result was created</returns>
    bool CreatePost(Users user, string contents, bool privacy);

    /// <summary>
    /// Delete article
    /// </summary>
    /// <param name="posts">Object Posts want to delete</param>
    /// <returns>Return result was deleted</returns>
    bool DeletePost(Posts posts);

    /// <summary>
    /// Update object Posts
    /// </summary>
    /// <param name="posts">Object Posts want to update</param>
    /// <returns>Return result was updated</returns>
    bool UpdatePost(Posts posts);

    /// <summary>
    /// Convert object DataRow to object Posts
    /// </summary>
    /// <param name="dr">Object DataRow store object Posts's information</param>
    /// <returns>Return object Posts was converted</returns>
    Posts ConvertObjectDataRowToPosts(DataRow dr);

    Posts GetPostByIdPost(Users users, int idPost);

    List<Posts> GetListPostsOfAllUser();

    DataTable GetDataTablePostsOfUserAndFriends();
}